package com.ruoci.redis.controller;

import com.ruoci.redis.utils.RedisUtil;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * @Author yang
 * string类型数据的操作
 **/
@RestController
public class StringController {

    @Resource
    RedisUtil redisUtil;


    @GetMapping("/stringSet")
    public boolean set(){
        return redisUtil.set("user", "name:natalia");
    }


    @PostMapping("/api/gcreport/v1/dataDocking/queryData")
    public String queryData(@RequestBody QueryDataReq requestDto,
                                            @RequestParam String token) {

        return "{\n" +
                "  \"timestamp\": \"2024-12-16T15:14:00.639\",\n" +
                "  \"success\": true,\n" +
                "  \"errorCode\": null,\n" +
                "  \"errorMessage\": null,\n" +
                "  \"errorDetail\": null,\n" +
                "  \"data\": {\n" +
                "    \"sysCode\": null,\n" +
                "    \"sn\": \"04f8e8f9-8786-4587-995f-3feab4c8e2ac\",\n" +
                "    \"requestTime\": \"1734333240632\",\n" +
                "    \"data\": [\n" +
                "      {\n" +
                "        \"taskCode\": \"HR\",\n" +
                "        \"taskData\": [\n" +
                "          {\n" +
                "            \"HR02001\": \"202411\",\n" +
                "            \"HR02002\": \"91310000132234503Q\",\n" +
                "            \"HR02030\": \"0.0\"\n" +
                "          },\n" +
                "          {\n" +
                "            \"HR02001\": \"202411\",\n" +
                "            \"HR02002\": \"913101151326025216\",\n" +
                "            \"HR02030\": \"183.0\"\n" +
                "          }\n" +
                "        ]\n" +
                "      }\n" +
                "    ]\n" +
                "  }\n" +
                "}\n";
    }



}
